package com.spzx.product.service.impl;

import com.spzx.product.domain.Brand;
import com.spzx.product.mapper.BrandMapper;
import com.spzx.product.service.IBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 品牌Service业务层处理
 */
@Service
public class BrandServiceImpl implements IBrandService {
    @Autowired
    private BrandMapper brandMapper;


    @Override
    public List<Brand> selectBrandList(Brand brand) {
        return brandMapper.selectBrandList(brand);
    }

    @Override
    public Brand selectById(Long id) {
        return brandMapper.selectById(id);
    }

    @Override
    public Integer add(Brand brand) {
        return brandMapper.insert(brand);
    }

    @Override
    public int change(Brand brand) {
        return brandMapper.update(brand);
    }

    @Override
    public int deleteById(Long[] ids) {
        return brandMapper.deleteById(ids);
    }

    @Override
    public List<Brand> selectBrandAll() {
        return brandMapper.selectBrandList(null);
    }
}
